<?php
/**
 * Moduleadmin_Controller_Moduleadmin
 * module admin controller
 * @author Adrian Stolarski
 */
class Maincategoryadmin_Controller_Maincategoryadmin implements Maincategoryadmin_Controller_Mainable {
    
    /**
     *
     * @var type $module_admin_model
     * module admin model handler
     */
    public $main_category_admin_model;
    /**
     *
     * @var type $random_token
     * random token handler
     */
    public $random_token;
    /**
     *
     * @var type $access_levels
     * access levels handler
     */
    public $access_levels;
    /**
     *
     * @var type $modules_data
     * modules data handler
     */
    public $modules_data;
    
    /**
     * constructor()
     */
    public function __construct() {
        $this->main_category_admin_model = new Maincategoryadmin_Model_Maincategoryadmin;
        $this->random_token = new Core_Data_Tokenizer;
        $this->access_levels = new Core_Controller_Getaccesslevels;
        $this->modules_data = new Core_Controller_Moduledata;
    }
    
    public function main(array $variables = null) {
        $page = array();
        $page = $this->main_category_admin_model->main($variables);
        //var_dump($page);
        $page['access_levels'] = $this->access_levels->main($variables);
        $page['modules_data'] = $this->modules_data->main($variables);
        //var_dump($page);
        $template = $page['template'];
        //var_dump($page);
        //echo $template;
        //die();
        $view_model = new Core_Model_Oldview($template);
        $view_model->assign('page', $page);
    }

}